This simple example of a loaded kernel server provides a trivial MiG-generated interface to demonstrate message passing between a user program and a server running within the kernel.  The server implements two services:  simple_puts(), which prints the supplied string on on the console using the kernel printf facilities, and simple_vers() which returns the kernel version string to the user.  The following files are used in the implementation:

simple.c	· This file uses the MIG generated interface to the simple server.  It obtains access to the server by looking up the port advertised on its behalf by the kernel loader.

simple.defs	· This file implements the MIG interface to the server.  It generates simpleServer.c, simpleUser.c, and simple.h.

simple_server.c	· This implements the guts of the server running in the kernel.  It is called from the kernel server interface routines when messages or other events are received for this server.

Load_Commands.sect	· This file specifies the actions to be taken when loading the server.  This includes allocating and advertising a port, and setting up a mapping to call into the loaded code when a message is received on that port.

Unload_Commands.sect	· This file specifies the actions to be taken when unloading the server.

To load this into the kernel loader type the following:

	kl_util -a simple_reloc

This will cause the server to be initialized by the kernel loader.  Running the program simple will then invoke the server, causing it to be loaded into the kernel.